package com.feeyo.groundservice.base_util.loading

import android.content.Context
import android.widget.TextView
import androidx.appcompat.widget.AppCompatImageView
import com.feeyo.groundservice.base_util.R
import com.feeyo.groundservice.base_util.rotateAnimation
import com.lxj.xpopup.core.CenterPopupView

/**
 *作者：QLH on 2022-10-17
 *描述：
 */
class LoadingPlanView constructor(context: Context, val msg: String? = null) :
    CenterPopupView(context) {

    override fun getImplLayoutId(): Int {
        return R.layout.view_my_loading
    }

    override fun onCreate() {
        super.onCreate()
        findViewById<AppCompatImageView>(R.id.loading_img).apply {
            rotateAnimation(2000)
        }
        findViewById<TextView>(R.id.tv_title).text = msg ?: "正在加载..."
    }
}